<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get the ID generated from the previous INSERT operation</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="mysqli-stmt.get-warnings.html">« mysqli_stmt::get_warnings</a></li>
      <li style="float: right;"><a href="mysqli-stmt.more-results.html">mysqli_stmt::more_results »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.mysqli-stmt.html">MySQLi_STMT</a></li>
    <li>Get the ID generated from the previous INSERT operation</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="mysqli-stmt.insert-id" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">mysqli_stmt::$insert_id</h1>
  <h1 class="refname">mysqli_stmt_insert_id</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">mysqli_stmt::$insert_id</span> -- <span class="refname">mysqli_stmt_insert_id</span> &mdash; <span class="dc-title">Get the ID generated from the previous INSERT operation</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-mysqli-stmt.insert-id-description">
  <h3 class="title">说明</h3>
  <p class="para">面向对象风格</p>
  <div class="fieldsynopsis"><span class="type"><span class="type">int</span>|<span class="type">string</span></span> <var class="varname"><a href="mysqli-stmt.insert-id.html">$mysqli_stmt-&gt;insert_id</a></var>;</div>

  <p class="para">过程化风格</p>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>mysqli_stmt_insert_id</strong></span>(<span class="methodparam"><span class="type"><a href="class.mysqli-stmt.html" class="type mysqli_stmt">mysqli_stmt</a></span> <code class="parameter">$statement</code></span>): <span class="type"><span class="type">int</span>|<span class="type">string</span></span></div>


  <div class="warning"><strong class="warning">警告</strong><p class="simpara">本函数还未编写文档，仅有参数列表。</p></div>

 </div>


</div></div></div></body></html>